If you're writing a program and you need to sift through enormous amounts of data , then you need SPEED... and that's what you get with Dennis McKinney's SD DataGrid and Liberty Basic. In order to display large amounts of data in the most professional manner, I think it boils down to two options. Option one... you can use a Listview, or option two... you can use Dennis's SD DataGrid. If you choose to use a Listview you will have to fill an array with all the data and then fill the Listview with the elements of the array. This is fine in LB if you don't have an extremely large amount of data to display. However, in Newsletter 102, Dennis showed us how to use Liberty Basic with ODBC on a relational database. Using SQL and ODBC you can create, view, and manipulate a relational database, such as Microsoft Access. Just a few months ago, Dennis updated his SD DataGrid so that we can now use LB and the odbcLoadRecordsetSQL function to execute a SELECT query, configure the grid, and display the results. The speed of this dll is astonishing! I have put together a little demonstration for you to compare filling an array and displaying the elements in a Listview compared to using Dennis's SD DataGrid. Assuming you already have MDAC installed on your computer (most people do), everything you need to run this test is in the zip file. (LB_VS_SdDatagridSpeedTest.zip). Just unzip it in a folder and run the test. The demo will create a test database, fill the database with 9999 records, each record containing 5 fields. After the database is created the speed test will begin. You will be given the time results of loading the double dimensioned array and displaying the results in a listview compared to the time it takes SD DataGrid to read and display the 9999 records. I think you will be amazed at the results.
My hat is off to Alyce Watson and Dennis McKinney for providing the listview code and the ODBC code, respectively.
You can use SD DataGrid with random access files, comma delimited files, or relational databases. The grid can handle an almost unlimited number of records. The limit is 2,147,483,647 records or the size of the system's memory. There is more information and LB sample code that can be seen at Dennis's web site: [http://syberden.net]. I hope you will pay him a visit.
With the SD DataGrid, I believe Dennis has taken LB to a new level. You can now easily create a powerful, commercial grade database program.
Thanks Dennis for this invaluable tool for LB!
Additional Information:
Download the trial version with examples for Liberty Basic here: [http://www.syberden.net/download.html]
Take a look at the impressive results using the grid with Liberty Basic 4 accessing Random Access and Comma delimited files here:
DEMO
The files ODBC V4 DSNLESSSpeedTest4.bas as well as Dennis' DLL, SD_DataGrid_Demo.DLL, are included in the zipped archive of this newsletter.